<template>
	<view>
		<view class="row" style="margin: 20rpx;">
			<view :class="clickIndex==index?'type-active row-center':'type-normal row-center' " v-for="item,index in types">
				{{item.name}}
			</view>
		</view>
		<view class="item" v-for="item in 4" @click="goItem()">
			<view class="top col" @click="goReport">
				<view class="row-between-center">
					<view class="row type">
						<image src="/static/images/read.png" class="type-img"></image>
						<view class="type-text">读书会</view>
					</view>
					<view class="status">进行中</view>
				</view>
				
				<view class="row" style="margin-top: 22rpx;">
					<image src="/static/images/lucky.png" class="img"></image>
					<view class="col-center-start" style="margin-left: 40rpx;">
						<view class="title">这是活动的名称</view>
						<view class="row-h-center"  style="margin-top: 10rpx;"> 
							<image src="/static/images/count.png" class="icon"></image>
							<view class="desc">12/20</view>
						</view>
						<view class="row-h-center" style="margin-top: 10rpx;">
							<image src="/static/images/location2.png" class="icon"></image>
							<view class="desc">青岛市黄岛区广西路60号</view>
						</view>
						<view class="row-h-center"  style="margin-top: 10rpx;">
							<image src="/static/images/time.png" class="icon"></image>
							<view class="desc">08.12 12:00 - 08.20 12:00</view>
						</view>
					</view>
				</view>
			</view>
			
			<view class="row-between-center" style="margin:20rpx;">
				<view class="price">免费</view>
				<view class="row">
					<view class="modify row-center" >立即报名</view>
				</view>
			</view>
			<view style="height: 20rpx;"></view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[
					{status:0},
					{status:1},
					{status:2},
					{status:3},
				],
				clickIndex:0,
				types:[
					{'name':'读书会'},
					{'name':'读书会'},
					{'name':'读书会'},
					{'name':'读书会'},
				]
			}
		},
		methods: {
			goItem(){
				uni.navigateTo({
					url:'/src/pages/user_index/detail'
				})
			}
		}
	}
</script>
<style>
	page{
		background: #F2F3F8;
	}
</style>
<style lang="scss" scoped>
	.type-active{
		margin-right: 10rpx;
		padding: 6rpx 26rpx;
		border-radius: 8rpx;
		background: #347FFF;
		color: #FFF;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
	.type-normal{
		padding: 6rpx 26rpx;
		margin-right: 10rpx;
		border-radius: 8rpx;
		background: #FFF;
		color: #676C7F;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
	
	.item{
		margin: 20rpx;
		border-radius: 12rpx;
		background-color: #F7F8FC;
		.top{
			padding: 20rpx;
			border-radius: 12rpx 0;
			background-color: white;
		}
		.type{
			background: #FFE9D7;
			.type-img{
				width: 32rpx;
				height: 32rpx;
			}
			.type-text{
				margin-right: 10rpx;
				margin-left: 10rpx;
				color: #CD5F28;
				font-size: 20rpx;
				font-style: normal;
				font-weight: 400;
				line-height: 36rpx; /* 180% */
			}
		}
		.status{
			color:  #3B60D3;
			font-size: 28rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 44rpx; /* 157.143% */
		}
		.img{
			border-radius: 12rpx;
			width: 200rpx;
			height: 160rpx;
			flex-shrink: 0;
		}
		.title{
			color: #1E2132;
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; /* 150% */
		}
		.icon{
			width: 32rpx;
			height: 32rpx;
		}
		.desc{
			color:  #6A6876;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx; /* 166.667% */
		}
		.price{
			color: #FF8934;
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; /* 150% */
		}
		.cancel{
			margin-right: 20rpx;
			width: 152rpx;
			height: 64rpx;
			flex-shrink: 0;
			border-radius: 16px;
			background: rgba(106, 104, 118, 0.25);
			color: #6A6876;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 40rpx; /* 166.667% */
		}
		.modify{
			width: 152rpx;
			height: 64rpx;
			flex-shrink: 0;
			border-radius: 16px;
			color: #FFF;
			text-align: center;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 40rpx; /* 166.667% */
			background:  #3B60D3;
		}
	}
	
	.acticve{
		white-space:nowrap;
		margin-right: 20rpx;
		padding: 6rpx 38rpx;
		border-radius: 8rpx;
		background: #347FFF;
		color: #FFF;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
	.normal{
		white-space:nowrap;
		padding: 6rpx 38rpx;
		margin-right: 20rpx;
		border-radius: 8rpx;
		background: #F2F3F8;
		color: #676C7F;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
</style>
